/**
 * 	write on 2005-10-26 11:49:25.
 */
package org.nanhill.xmlro.srojs;

import org.nanhill.xmlro.SerializerFactory;
import org.nanhill.xmlro.XmlroOutput;
import org.nanhill.xmlro.sro.SroTransport;

/**
 * This class is thread safe.
 * 
 * @author alin
 * 
 */
public class SroJavascriptTransport extends SroTransport {
	private static final SerializerFactory DEFAULT_SERIALIZER_FACTORY = new SroJavascriptSerializerFactory();

	protected SerializerFactory serializerFactory = DEFAULT_SERIALIZER_FACTORY;

	public SerializerFactory getSerializerFactory() {
		return serializerFactory;
	}

	public void setSerializerFactory(SerializerFactory serializerFactory) {
		this.serializerFactory = serializerFactory;
	}

	protected XmlroOutput getOutput() {
		XmlroOutput output = new JavascriptOutput();
		output.setSerializerFactory(this.serializerFactory);
		return output;
	}

}
